import request from '../../../../../public/js/common/api/api.js';

const PigsltrUrl = Utils.CurDomain.PigsltrUrl;
const url = Utils.CurDomain.BiFood;
const FeedBackUrl = Utils.CurDomain.FeedBackUrl

const _ajaxOptions = {
    contentType: 'application/json',
    dataType: 'json',
    async: true,
    dataFilter(data, type) {
        return data;
    }
};
export default class DailyApi {
    /**
       * 获取日报 详情
       * @param {*} data 
       * @returns 
       */
    static postDailyList(data) {
        return request.post(`${PigsltrUrl}/pigsltrdailyrpts/todlist`, data, true, _ajaxOptions);
    }
    /**
       * 获取日报 均价
       * @param {*} data 
       * @returns 
       */
    static postDailyweaList(data) {
        return request.post(`${PigsltrUrl}/pigsltrdailyrpts/wealist`, data, true, _ajaxOptions);
    }

    // static queryUserName(sid) {
    //     return request.get(`${Utils.CurDomain.WechatUrl}/wxauths/cur?sid=${sid}`);
    // }
    //TODO :获取用户关联员工信息
    static queryUserInfo() {
        return request.get(`${Utils.CurDomain.AccountUrl}/accounts/eply`);
    }
    // 获取查阅用户s
    static queryReadingUser(id) {
        return request.get(`${FeedBackUrl}/yyreads/${id}/us`);
    }

    // 创建实体查阅
    static addReadingUser(id, data) {
        return request.post(`${FeedBackUrl}/yyreads/${id}`, data);
    }

}